"""
@Project:ruiji
@File:aa.py
@Author:马可
@Date:上午 10:50
"""
import threading
class AA:
    def __init__(self):
        pass

    def __new__(cls, *args, **kwargs):
        if cls._instance:
            return cls._instance
        with cls._lock:
            if not cls._instance:
                cls._instance = super().__new__(cls,*args,**kwargs)
                return cls._instance



a = AA
b = AA
print(id(a))
print(id(b))

